#!/bin/sh
#取消cp的 alias
unalias cp

#Manager
cd /opt/gitee/jeepay/jeepay-ui/jeepay-ui-manager
pwd
git reset --hard
git pull
npm install
npm run build
cp -rf /opt/gitee/jeepay/jeepay-ui/jeepay-ui-manager/dist/* /opt/gitee/jeepay/jeepay-ui/jeepay-ui-manager/html

#merchant
cd /opt/gitee/jeepay/jeepay-ui/jeepay-ui-merchant
pwd
git reset --hard
git pull
npm install
npm run build
cp -rf /opt/gitee/jeepay/jeepay-ui/jeepay-ui-merchant/dist/* /opt/gitee/jeepay/jeepay-ui/jeepay-ui-merchant/html

#cashier
cd /opt/gitee/jeepay/jeepay-ui/jeepay-ui-cashier
pwd
git reset --hard
git pull
npm install
npm run build
cp -rf /opt/gitee/jeepay/jeepay-ui/jeepay-ui-cashier/dist/* /opt/gitee/jeepay/jeepay-ui/jeepay-ui-cashier/html

chmod 777 /opt/gitee/jeepay/jeepay/*.sh

currTime=$(date +"%Y-%m-%d %T")
echo $currTime
echo "------done---------"